package com.yanqu.road.server;

import com.yanqu.road.NettyMgr;
import com.yanqu.road.dao.db.DBTableInfoMgr;
import com.yanqu.road.dao.db.DbNameStrategy;
import com.yanqu.road.logic.helper.CrossChannelHelper;
import com.yanqu.road.reids.subpub.RedisReliableMessageSubPub;
import com.yanqu.road.server.agent.AgentInterfaceMgr;
import com.yanqu.road.server.manager.CrossDataAnalyticsMgr;
import com.yanqu.road.server.manager.activity.QixiCrossMgr.CrossQixiConfigMgr;
import com.yanqu.road.server.manager.activity.QixiCrossMgr.CrossQixiMgr;
import com.yanqu.road.server.manager.activity.apprentice.CrossApprenticeConfigMgr;
import com.yanqu.road.server.manager.activity.apprentice.CrossApprenticeMgr;
import com.yanqu.road.server.manager.activity.biaoju.CrossBiaoJuConfigMgr;
import com.yanqu.road.server.manager.activity.biaoju.CrossBiaoJuMgr;
import com.yanqu.road.server.manager.activity.channelmusicroomrank.CrossChannelMusicRoomRankActivityMgr;
import com.yanqu.road.server.manager.activity.channelmusicroomrank.CrossChannelMusicRoomRankConfigMgr;
import com.yanqu.road.server.manager.activity.chuhan.CrossChuHanConfigMgr;
import com.yanqu.road.server.manager.activity.chuhan.CrossChuHanMgr;
import com.yanqu.road.server.manager.activity.commonsupport.CommonSupportMgr;
import com.yanqu.road.server.manager.activity.commonteam.CommonTeamConfigMgr;
import com.yanqu.road.server.manager.activity.commonteam.CommonTeamMgr;
import com.yanqu.road.server.manager.activity.commonwish.CommonWishDrawActivityMgr;
import com.yanqu.road.server.manager.activity.condition.ConditionMgr;
import com.yanqu.road.server.manager.activity.daomu.DaoMuActivityMgr;
import com.yanqu.road.server.manager.activity.doublespring.CrossDoubleSpringActivityMgr;
import com.yanqu.road.server.manager.activity.fanxiuspring.CrossFanXiuSpringActivityMgr;
import com.yanqu.road.server.manager.activity.feast.CrossFeastMgr;
import com.yanqu.road.server.manager.activity.fivehero.CrossFiveHeroMgr;
import com.yanqu.road.server.manager.activity.flowerstudy.CrossFlowerStudyMgr;
import com.yanqu.road.server.manager.activity.guagifts.CrossGuaGiftsConfigMgr;
import com.yanqu.road.server.manager.activity.guagifts.CrossGuaGiftsMgr;
import com.yanqu.road.server.manager.activity.hongxian.CrossHongXianMgr;
import com.yanqu.road.server.manager.activity.horserun.CrossHorseRunConfigMgr;
import com.yanqu.road.server.manager.activity.horserun.CrossHorseRunMgr;
import com.yanqu.road.server.manager.activity.hsisland.CrossHsIslandActivityConfigMgr;
import com.yanqu.road.server.manager.activity.hsisland.CrossHsIslandActivityMgr;
import com.yanqu.road.server.manager.activity.jinli.CrossJinLiMgr;
import com.yanqu.road.server.manager.activity.jiuzhou.CrossJiuZhouMgr;
import com.yanqu.road.server.manager.activity.langyamemorial.CrossLangYaMemorialMgr;
import com.yanqu.road.server.manager.activity.langyabang.CrossLangYaBangMgr;
import com.yanqu.road.server.manager.activity.liondance.CrossLionDanceActivityMgr;
import com.yanqu.road.server.cross3server.conn.Cross3ConnSet;
import com.yanqu.road.server.cross3server.manager.Cross3ChangeChannelServerMgr;
import com.yanqu.road.server.cross3server.manager.Cross3XRankMgr;
import com.yanqu.road.server.cross3server.manager.Cross3XServerNameMgr;
import com.yanqu.road.server.manager.activity.*;
import com.yanqu.road.server.manager.activity.cat.CrossCatActivityMgr;
import com.yanqu.road.server.manager.activity.carptrip.CrossCarpTripActivityMgr;
import com.yanqu.road.server.manager.activity.celebration.CelebrationMgr;
import com.yanqu.road.server.manager.activity.climbtower.CrossClimbTowerMgr;
import com.yanqu.road.server.manager.activity.dragonboatrace.DragonBoatRaceMgr;
import com.yanqu.road.server.manager.activity.hanghai.CrossHangHaiMgr;
import com.yanqu.road.server.manager.activity.lottery.CrossActivityLotteryMgr;
import com.yanqu.road.server.manager.activity.metaspace.CrossMetaSpaceMgr;
import com.yanqu.road.server.manager.activity.musicroomrank.CrossMusicRoomRankActivityMgr;
import com.yanqu.road.server.manager.activity.musicroomrank.CrossMusicRoomRankConfigMgr;
import com.yanqu.road.server.manager.activity.newyearbag.CrossNewYearBagMgr;
import com.yanqu.road.server.manager.activity.newyear2023.FireWorkMgr;
import com.yanqu.road.server.manager.activity.operamask.CrossOperaMaskMgr;
import com.yanqu.road.server.manager.activity.peakseacraft.PeakSeacraftMgr;
import com.yanqu.road.server.manager.activity.rankunionwar.CrossRankUnionWarMgr;
import com.yanqu.road.server.manager.activity.relation.CrossRelationRankMgr;
import com.yanqu.road.server.manager.activity.seacraftsouthsea.SeacraftSouthSeaMgr;
import com.yanqu.road.server.manager.activity.selectlottery.CrossSelectLotteryMgr;
import com.yanqu.road.server.manager.activity.signindraw.CrossSignInDrawActivityMgr;
import com.yanqu.road.server.manager.activity.snowgarden.CrossActivityMallDayBuyConfigMgr;
import com.yanqu.road.server.manager.activity.snowgarden.CrossActivityMallDayBuyMgr;
import com.yanqu.road.server.manager.activity.sonhai.CrossSonHaiActivityConfigMgr;
import com.yanqu.road.server.manager.activity.sonhai.CrossSonHaiActivityMgr;
import com.yanqu.road.server.manager.activity.soulbone.CrossSoulBoneMgr;
import com.yanqu.road.server.manager.activity.springunionbanquet.CrossSpringUnionBanquetActivityMgr;
import com.yanqu.road.server.manager.activity.suitang.CrossSuiTangMgr;
import com.yanqu.road.server.manager.activity.summergames.CrossSummerGamesMgr;
import com.yanqu.road.server.manager.activity.summerquiz.CrossSummerQuizMgr;
import com.yanqu.road.server.manager.activity.tonbing.CrossTonBingMgr;
import com.yanqu.road.server.manager.activity.tongbing.CrossTongBingMgr;
import com.yanqu.road.server.manager.activity.twins.CrossTwinsMgr;
import com.yanqu.road.server.manager.activity.unionchest.CrossUnionChestMgr;
import com.yanqu.road.server.manager.activity.witchdraw.CrossWitchDrawMgr;
import com.yanqu.road.server.manager.activity.xingyou.CrossXingYouShanShuiMgr;
import com.yanqu.road.server.manager.activity.xiuxian.CrossXiuXianMgr;
import com.yanqu.road.server.manager.activity.yearMaster.YearMasterMgr;
import com.yanqu.road.server.manager.activity.zhenhuan.CrossZhenHuanConfigMgr;
import com.yanqu.road.server.manager.activity.zhenhuan.CrossZhenHuanMgr;
import com.yanqu.road.server.manager.activity.zhounianturntable.CrossZhouNianTurntableMgr;
import com.yanqu.road.server.manager.banquet.CrossBanquetConfigMgr;
import com.yanqu.road.server.manager.banquet.baifubanquet.CrossGoodBanquetMgr;
import com.yanqu.road.server.manager.busyfarming.CrossBusyFarmingMgr;
import com.yanqu.road.server.manager.chefduel.CrossChefDuelActivityMgr;
import com.yanqu.road.server.manager.chefduel.CrossChefDuelMgr;
import com.yanqu.road.server.manager.config.*;
import com.yanqu.road.server.manager.cookboy.CrossCookBoyActivityMgr;
import com.yanqu.road.server.manager.cookboy.CrossCookBoyMgr;
import com.yanqu.road.server.manager.cross.battle.DaFuWengDataMgr;
import com.yanqu.road.server.manager.cross.battle.DaFuWengMgr;
import com.yanqu.road.server.manager.cross.battle.HuaShiGangMgr;
import com.yanqu.road.server.manager.cross.battle.ShuiHuMgr;
import com.yanqu.road.server.manager.cross.battle.dunhuangshiku.DunHuangShiKuMgr;
import com.yanqu.road.server.manager.cross.battle.ghost.GhostMgr;
import com.yanqu.road.server.manager.douluodalu.CrossDouLuoDaLuActivityMgr;
import com.yanqu.road.server.manager.douluodalu.CrossDouLuoDaLuMgr;
import com.yanqu.road.server.manager.gashapon.CrossGashaponMgr;
import com.yanqu.road.server.manager.gourdchild.CrossGourdChildMgr;
import com.yanqu.road.server.manager.guess.CrossCommonGuessMgr;
import com.yanqu.road.server.manager.kuang.CrossKuangMgr;
import com.yanqu.road.server.manager.log.CrossActivityLogMgr;
import com.yanqu.road.server.manager.systemgroup.newmonopolymkt.CrossNewMonopolyMarketConfigMgr;
import com.yanqu.road.server.manager.systemgroup.newmonopolymkt.CrossNewMonopolyMarketMgr;
import com.yanqu.road.server.manager.orewar.CrossOreWarActivityMgr;
import com.yanqu.road.server.manager.orewar.CrossOreWarChatMgr;
import com.yanqu.road.server.manager.orewar.CrossOreWarMgr;
import com.yanqu.road.server.manager.orewar.CrossOreWarRankMgr;
import com.yanqu.road.server.manager.palace.CrossPalaceActivityMgr;
import com.yanqu.road.server.manager.pawnshop.CrossPawnshopMgr;
import com.yanqu.road.server.manager.peakstronghold.CrossPeakStrongholdActivityMgr;
import com.yanqu.road.server.manager.peakstronghold.CrossPeakStrongholdMgr;
import com.yanqu.road.server.manager.springdinner.SpringDinnerMgr;
import com.yanqu.road.server.manager.strongholdwar.CrossStrongholdActivityMgr;
import com.yanqu.road.server.manager.strongholdwar.CrossStrongholdMgr;
import com.yanqu.road.server.manager.strongholdwar.CrossStrongholdRankMgr;
import com.yanqu.road.server.manager.strongholdwar.StrongholdWarMgr;
import com.yanqu.road.server.manager.suoyao.SuoYaoMgr;
import com.yanqu.road.server.manager.systemgroup.Cross2SystemWeekGroupMatchMgr;
import com.yanqu.road.server.manager.tomb.TombServiceMgr;
import com.yanqu.road.server.manager.tradewar.CrossTradeWarActivityMgr;
import com.yanqu.road.server.manager.tradewar.CrossTradeWarChatMgr;
import com.yanqu.road.server.manager.tradewar.CrossTradeWarMgr;
import com.yanqu.road.server.manager.tradewar.CrossTradeWarRankMgr;
import com.yanqu.road.server.manager.turtle.CrossTurtleMgr;
import com.yanqu.road.server.manager.union.CrossUnionActivityDataMgr;
import com.yanqu.road.server.manager.union.CrossUnionConfigMgr;
import com.yanqu.road.server.manager.union.activitygroup.Cross2UnionActivityGroupMgr;
import com.yanqu.road.server.manager.union.honors.CrossUnionHonorsActivityMgr;
import com.yanqu.road.server.manager.unionwar.*;
import com.yanqu.road.server.manager.user.CrossUserMgr;
import com.yanqu.road.server.manager.yrank.CrossYRankMgr;
import com.yanqu.road.server.manger.*;
import com.yanqu.road.server.redis.SystemConfigRedisSubPub;
import com.yanqu.road.server.timer.Cross2TimerMgr;
import org.apache.logging.log4j.LogManager;
import com.yanqu.road.utils.config.Config;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author wpj
 * @Date 2020/9/28
 */
public class CrossBattleServer extends CrossBaseServer {
    private static CrossBattleServer crossBattleServer;

    public static CrossBattleServer getInstance() {
        if (null == crossBattleServer) {
            crossBattleServer = new CrossBattleServer();
            if(null == CrossBaseServer.crossBaseServer) {
                CrossBaseServer.crossBaseServer = crossBattleServer;
            }else {
                logger.error("CrossBattleServer getInstance baseServer exist");
            }
        }
        return crossBattleServer;
    }

    public static void main(String[] args) {
        long time = System.currentTimeMillis();
        if (args.length <= 0) {
            System.err.println("check set config path");
            return;
        }

        Config.ParseArgs(args);
        cfgPath = args[0];

        CrossBattleServer crossBattleServer = CrossBattleServer.getInstance();
        crossBattleServer.setServerType(Integer.valueOf(args[1]));
        if (!crossBattleServer.start(crossBattleServer.getServerType(), CrossBattleServer.class.getName())) {
            System.err.println("CrossBattleServer start fail!");
            System.exit(1);
            return;
        }

        // 活动跨服有新订阅都往这里加
        RedisReliableMessageSubPub.addSubPub(new SystemConfigRedisSubPub());
        RedisReliableMessageSubPub.getInstance().subscribe();

        // 连接到跨地区服务器
        if (!Cross3ConnSet.init(0)) {
            System.err.println("load Cross3ConnSet fail!");
            System.exit(1);
            return;
        }

        CrossActivityLogMgr.init();

        DBTableInfoMgr dbTableInfoMgr = new DBTableInfoMgr();
        dbTableInfoMgr.init(DbNameStrategy.getCross2Db(), "com.yanqu.road.entity.log", true);
        crossBattleServer.setDbTableInfoMgr(dbTableInfoMgr);

        Cross2TimerMgr.initGeneralTimers(crossBattleServer.getServerType());
        System.err.println("CrossBattleServer start success");
        logger.info("CrossBattleServer start success,cost time:" + (System.currentTimeMillis() - time));
        TempServer.tempServerLogger.info("notify process start success!");

        //注册异常关闭处理过程
        Runtime.getRuntime().addShutdownHook(new Thread(() -> {
            logger.info("CrossBattleServer 关闭服务器");
            CrossBattleServer.getInstance().newStop();
        }));
    }

    @Override
    public boolean stop() {
        try {
            super.stop();
            //保存mgr数据
            for (TempMgr tempMgr : getInstance().getMgrList()) {
                try {
                    tempMgr.save();
                }catch (Exception e){
                    logger.error("mgr save error:", e);
                }
            }
        } catch (Exception e) {
            logger.error("CrossBattleServer close error", e);
            return false;
        }

        return true;
    }

    public void newStop(){
        try {
            Thread.sleep(5000);
            // 关闭netty 避免有新连接
            NettyMgr.newStop();
            // 关闭定时器
            Cross2TimerMgr.stop();
            TempServer.getTimerExecutorService().shutdown();

            Thread.sleep(1000);
            // 停止
            for (TempMgr tempMgr : getInstance().getMgrList()){
                tempMgr.stop();
            }
            // 保存
            for (TempMgr tempMgr : getInstance().getMgrList()){
                try {
                    tempMgr.save();
                    logger.info("aaaaaaa");
                }catch (Exception e){
                    logger.error("mgr save error:", e);
                }
            }
            logger.info("CrossBattleServer 服务器已关闭");
            TempServer.deleteFile("./crossServer.pid");
            super.stopWithLogger();
            LogManager.shutdown();
            System.out.println("CrossBattleServer 服务器已关闭");
        }catch (Exception e) {
            logger.error("CrossBattleServer stop error", e);
        }
    }




    @Override
    public List<TempMgr> getMgrList() {
        List<TempMgr> mgrList = new ArrayList<>();
        //配置放前面
        mgrList.add(new CrossCheckConfigVersionMgr());
        mgrList.add(new ConfigMgr());
        mgrList.add(new ChannelConfigMgr(sType));
        mgrList.add(new CrossUnionConfigMgr());
        mgrList.add(new ServerListMgr());
        mgrList.add(new ServerGroupMgr());
        mgrList.add(new CrossUnionServerGroupMgr());
        mgrList.add(new AgentInterfaceMgr());
        mgrList.add(new SkinMgr());
        mgrList.add(new ServerLanguageMgr());
        mgrList.add(new PatronsMgr());
        mgrList.add(new BeautyMgr());
        mgrList.add(new TempCommonMgr());
        mgrList.add(new TempGoodsBagMgr());
        mgrList.add(new VehicleMgr());
        mgrList.add(new VipMgr());
        mgrList.add(new GoodsMgr());
        mgrList.add(new BattleChannelSystemConfigMgr());
        mgrList.add(new DAServerListMgr());
        mgrList.add(new CrossDataAnalyticsMgr());
        mgrList.add(new KafKaHelperMgr());

        //活动mgr
        mgrList.add(new Cross2UnionActivityGroupMgr()); // 商会活动分组，放在活动加载完、各个商会活动加载前
        mgrList.add(new ActivityMgr());
        mgrList.add(new ActivityRankMgr());
        mgrList.add(new ActivityTeamRankMgr());
        mgrList.add(new ActivityChatMgr());
        mgrList.add(new ActivityDisperseGoldMgr());
        mgrList.add(new CrossUnionActivityTaskMgr());
        mgrList.add(new CrossTradeWarActivityMgr());
        mgrList.add(new CrossTradeWarRankMgr());
        mgrList.add(new CrossTradeWarChatMgr());
        mgrList.add(new CrossTradeWarMgr());
        mgrList.add(new CrossOreWarActivityMgr());
        mgrList.add(new CrossOreWarRankMgr());
        mgrList.add(new CrossOreWarMgr());
        mgrList.add(new CrossOreWarChatMgr());
        mgrList.add(new HuaShiGangMgr());
        mgrList.add(new YearMasterMgr());
        mgrList.add(new CrossStrongholdActivityMgr());
        mgrList.add(new CrossStrongholdRankMgr());
        mgrList.add(new CrossStrongholdMgr());
        mgrList.add(new StrongholdWarMgr());
        mgrList.add(new DaFuWengMgr());
        mgrList.add(new DaFuWengDataMgr());
        mgrList.add(new CrossGeneralActivityRankMgr());
        mgrList.add(new ShuiHuMgr());
        mgrList.add(new GhostMgr());
        mgrList.add(new SuoYaoMgr());
        mgrList.add(new CrossBusyFarmingMgr());
        mgrList.add(new CrossGourdChildMgr());
        mgrList.add(new CrossDouLuoDaLuActivityMgr());
        mgrList.add(new CrossDouLuoDaLuMgr());
        //商会战
        mgrList.add(new CrossUnionWarActivityMgr());
        mgrList.add(new CrossUnionWarMgr());
        mgrList.add(new CrossUnionWarRankMgr());
        mgrList.add(new CrossUnionWarGuessMgr());
        mgrList.add(new CrossPawnshopMgr());
        mgrList.add(new DunHuangShiKuMgr());
        mgrList.add(new DragonBoatRaceMgr());
        mgrList.add(new CrossBanquetConfigMgr());
        mgrList.add(new CrossGoodBanquetMgr());

        mgrList.add(new CrossUserMgr());

        mgrList.add(new CrossChefDuelMgr());
        mgrList.add(new CrossChefDuelActivityMgr());
        //中华小当家
        mgrList.add(new CrossCookBoyMgr());
        mgrList.add(new CrossCookBoyActivityMgr());
        mgrList.add(new CrossRelationActivityMgr());
        mgrList.add(new CrossRelationRankMgr());
        //年夜饭
        mgrList.add(new SpringDinnerMgr());
        mgrList.add(new SeacraftSouthSeaMgr());
        mgrList.add(new CelebrationMgr());
        //皇城
        mgrList.add(new CrossPalaceActivityMgr());
        mgrList.add(new AllActivityMgr());
        mgrList.add(new CrossUnionActivityDataMgr());
        mgrList.add(new CrossHangHaiMgr());
        //商会荣誉堂
        mgrList.add(new CrossUnionHonorsActivityMgr());
        mgrList.add(new CrossMetaSpaceMgr());
        // 统兵演武
        mgrList.add(new CrossTongBingMgr());
        mgrList.add(new CrossTonBingMgr());
        mgrList.add(new CrossZhouNianTurntableMgr());
        // 畅音阁
        mgrList.add(new CrossOperaMaskMgr());

        mgrList.add(new CrossClimbTowerMgr());
        //癫疯商会战
        mgrList.add(new CrossRankUnionWarMgr());
        //绝代双骄
        mgrList.add(new CrossTwinsMgr());
        //怪化猫
        mgrList.add(new CrossCatActivityMgr());
        //巔峰据点战
        mgrList.add(new CrossPeakStrongholdActivityMgr());
        mgrList.add(new CrossPeakStrongholdMgr());

        //广府联动
        mgrList.add(new CrossLionDanceActivityMgr());

        //古墓
        mgrList.add(new TombServiceMgr());

        //鲤鱼跃龙门
        mgrList.add(new CrossCarpTripActivityMgr());

        // 新春红包
        mgrList.add(new CrossNewYearBagMgr());

        //烟花祈愿
        mgrList.add(new FireWorkMgr());
        //活动全服任务等
        mgrList.add(new ConditionMgr());

        //凡修迎新春
        mgrList.add(new CrossFanXiuSpringActivityMgr());

        //促织集市--通用抽奖
        mgrList.add(new CommonWishDrawActivityMgr());

        //活动抽奖
        mgrList.add(new CrossActivityLotteryMgr());
        // 凡人修仙
        mgrList.add(new CrossXiuXianMgr());
        // 山河乐宴
        mgrList.add(new CrossFeastMgr());
        //巅峰海上争霸
        mgrList.add(new PeakSeacraftMgr());
        //五熊争霸
        mgrList.add(new CrossFiveHeroMgr());

        //屠苏宴会
        mgrList.add(new CrossSpringUnionBanquetActivityMgr());

        //周年签到抽奖
        mgrList.add(new CrossSignInDrawActivityMgr());
        //
        mgrList.add(new CrossLangYaMemorialMgr());
        //琅琊榜
        mgrList.add(new CrossLangYaBangMgr());
        //行游山水
        mgrList.add(new CrossXingYouShanShuiMgr());

        //红仙
        mgrList.add(new CrossHongXianMgr());
        mgrList.add(new CrossSoulBoneMgr());
        mgrList.add(new CrossYRankMgr());

        //商会宝箱
        mgrList.add(new CrossUnionChestMgr());

        mgrList.add(new CrossKuangMgr());

        mgrList.add(new NameMgr());

        mgrList.add(new CrossFlowerStudyMgr());

        mgrList.add(new CrossQixiConfigMgr());
        mgrList.add(new CrossQixiMgr());

        mgrList.add(new CrossGuaGiftsConfigMgr());
        mgrList.add(new CrossGuaGiftsMgr());

        mgrList.add(new Cross2SystemWeekGroupMatchMgr());
        mgrList.add(new CrossNewMonopolyMarketConfigMgr());
        mgrList.add(new CrossNewMonopolyMarketMgr());

        mgrList.add(new CrossWitchDrawMgr());

        // 锦鲤签
        mgrList.add(new CrossJinLiMgr());

        // 九州棋局
        mgrList.add(new CrossJiuZhouMgr());

        if (CrossChannelHelper.isCross3(CrossBattleServer.getInstance().getServerId())) {
            mgrList.add(new Cross3XRankMgr());
            mgrList.add(new Cross3XServerNameMgr());
            mgrList.add(new Cross3ChangeChannelServerMgr());
            mgrList.add(new CrossChannelMusicRoomRankConfigMgr());
            mgrList.add(new CrossChannelMusicRoomRankActivityMgr());
        }

        //盗墓笔记
        mgrList.add(new DaoMuActivityMgr());

        //妙音坊冲榜
        mgrList.add(new CrossMusicRoomRankConfigMgr());
        mgrList.add(new CrossMusicRoomRankActivityMgr());

        // 冰雪全活动每日团购
        mgrList.add(new CrossActivityMallDayBuyConfigMgr());
        mgrList.add(new CrossActivityMallDayBuyMgr());

        //踏春游记
        mgrList.add(new CrossDoubleSpringActivityMgr());
        mgrList.add(new CrossSummerGamesMgr());
        mgrList.add(new CrossSummerQuizMgr());

        //甄嬛传
        mgrList.add(new CrossZhenHuanConfigMgr());
        mgrList.add(new CrossZhenHuanMgr());

        //镖局
        mgrList.add(new CrossBiaoJuConfigMgr());
        mgrList.add(new CrossBiaoJuMgr());

        mgrList.add(new CrossSuiTangMgr());

        //通用竞猜
        mgrList.add(new CrossCommonGuessMgr());

        //通用组队
        mgrList.add(new CommonTeamConfigMgr());
        mgrList.add(new CommonTeamMgr());

        //
        mgrList.add(new CommonSupportMgr());

        //山海伏兽
        mgrList.add(new CrossSonHaiActivityConfigMgr());
        mgrList.add(new CrossSonHaiActivityMgr());

        //海神岛
        mgrList.add(new CrossHsIslandActivityConfigMgr());
        mgrList.add(new CrossHsIslandActivityMgr());

        // 乌龟对对碰
        mgrList.add(new CrossTurtleMgr());

        //小马快跑
        mgrList.add(new CrossHorseRunMgr());
        mgrList.add(new CrossHorseRunConfigMgr());

        // 幸运扭蛋
        mgrList.add(new CrossGashaponMgr());
        //爱徒养成
        mgrList.add(new CrossApprenticeConfigMgr());
        mgrList.add(new CrossApprenticeMgr());

        mgrList.add(new CrossChuHanConfigMgr());
        mgrList.add(new CrossChuHanMgr());

        //通用自选抽奖
        mgrList.add(new CrossSelectLotteryMgr());

        return mgrList;
    }

}
